package day07;

import java.util.Arrays;

public class txt14 {
    public static void main(String[] args) {
        int[] a = {8, 6, 4, 9, 3};
        getmax(a);
        System.out.println(Arrays.toString( a));

    }


    static void getmax(int[] a) {
        for(int j=0;j<4;j++){
            for (int i = 0; i < a.length - 1-j; i++) {
                if (a[i] > a[i + 1]) {
                    int t = a[i];
                    a[i] = a[i + 1];
                    a[i + 1] = t;
        }
            }
        }
    }
}